using System;
using System.Collections.Generic;
using System.Text;
using System.Runtime.Serialization;

namespace tKitchen
{
    public class MealPlan
    {
        int mealPlanId;
        Meal meal;
        string notes;
        DateTime date;

        #region Properties
        public int MealPlanId
        {
            get { return mealPlanId; }
            set { mealPlanId = value; }
        }
        public Meal Meal
        {
            get { return meal; }
            set { meal = value; }
        }
        public string Notes
        {
            get { return notes; }
            set { notes = value; }
        }
        public DateTime Date
        {
            get { return date; }
            set { date = value; }
        }
        #endregion


        public MealPlan()
        {
            mealPlanId = -1;
        }
        public MealPlan(MealPlanPO poIn)
        {
            this.Date = poIn.Date;
            this.Meal = new Meal(poIn.Meal);
            this.Notes = poIn.Notes;
            this.MealPlanId = poIn.MealPlanId;
   
        }

        public override string ToString()
        {
            return this.Meal.Name;
        }

        public MealPlan Copy()
        {
            MealPlan temp = new MealPlan();
            temp.Date = this.Date;
            temp.Meal = this.Meal.Copy();
            temp.MealPlanId = this.MealPlanId;
            temp.Notes = this.Notes;

            return temp;
        }

        #region ISerializable Members

        public void GetObjectData(SerializationInfo info, StreamingContext context)
        {
            //throw new Exception("The method or operation is not implemented.");
        }

        #endregion

    }
}
